﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<MBS_FoodBooking.Models.ShoppingCartModel>" %>
<table style="width: 100%;">
    <% foreach (var item in Model.LstShoppingCart)
       { %>
    <tr>
        <td align="center">
            <% using (Ajax.BeginForm("RemovefromCart", "FoodBooking", new AjaxOptions { UpdateTargetId = "shoppingCart" }))
               { %>
            <img src='<%= Url.Content(item.ImgUrl)%>' style="width: 20px; height: 25px; padding-left: 10px;
                padding-bottom: 3px; padding-top: 3px" />
            <label style="width: 20px; height: 25px; padding-left: 10px; padding-bottom: 3px;
                font-family: @Dotum; padding-top: 3px">
                <%=Html.Encode(item.ItemName) %>
                *
            </label>
            <%= Html.Label(item.Quantity.ToString())%>
            <input type="hidden" value="<%= item.Id %>" name="hdnIndex" />
            <input id="btnAdd" type="image" src="../../Content/Images/Cancel.png" style="width: 30px;
                height: 25px;" />
            <%--<button id="btnAdd" type="submit" style="width: 30px; height: 25px; padding: 2px 10px 2px 5px; ">
                <img src="../../Content/Images/Cancel.png" style="width: 30px; height: 25px;" /></button>--%>
            <%} %>
        </td>
    </tr>
    <% } %>
    <tr>
        <td colspan="2" align="center">
            <%=Html.Encode("Total Price: ") %>
            <%= Html.Encode("$ " + Model.Price.ToString(("#,##0.00#")))%>
        </td>
    </tr>
    <tr>
        <td colspan="2" align="center">
            <% using (Html.BeginForm("CheckOut", "ShopingCart"))
               { %>
            <button id="btnProcexted" type="submit" style="azimuth: center" onclick="javascript:check()">
                <img src="../../Content/Images/checkout.png" style="width: 70px;" /></button>
        </td>
    </tr>
    <tr>
    <td align="char">
            <%if (Model.BookingId == 0)
              { %>
            
                <span style="font-family:@MS Gothic">Enter BookingID</span>
                <%=Html.TextBox("txtBookingId")%>
               
           
            <%} %>
            <% } %>
    </td>
    
    </tr>
</table>

<script type="text/javascript">
    function check() {
        alert('hi');
    }
</script>